public class SystemItemTest {

	public void testGetFullPath() {
		// Generate a set of files and directories
		Directory root = new Directory("", null);
		Directory dir1 = new Directory("dir1", root);
		Directory dir11 = new Directory("dir11", dir1);
		Directory dir2 = new Directory("dir2", root);
		File file1 = new File("file1", root);
		File file2 = new File("file2", dir1);
		File file3 = new File("file3", dir11);
		File file4 = new File("file4", dir2);

		// Check full path of root
		assert root.getFullPath() == "";

		// Check full path of non-root directories
		assert dir1.getFullPath().equals("/dir1");
		assert dir11.getFullPath().equals("/dir1/dir11");
		assert dir2.getFullPath().equals("/dir2");

		// Check full path of files
		assert file1.getFullPath().equals("/file1");
		assert file2.getFullPath().equals("/dir1/file2");
		assert file3.getFullPath().equals("/dir1/dir11/file3");
		assert file4.getFullPath().equals("/dir2/file4");

		// Check full paths of SystemItems with multi-word names
		Directory m1 = new Directory("Multi name file", root);
		Directory m2 = new Directory(" This  has    weird spacing   ", m1);
		assert m1.getFullPath().equals("/Multi name file");
		assert m2.getFullPath().equals(
				"/Multi name file/ This  has    weird spacing   ");

		// Check full paths of SystemItems with only empty space names
		File x1 = new File("          ", dir1);
		assert x1.getFullPath().equals("/dir1/          ");

		System.out.println("method getFullPath working as intended");
	}

	public static void main(String[] args) {
		SystemItemTest tester = new SystemItemTest();
		tester.testGetFullPath();
	}
}
